class LoginModel {
  Future<bool> authenticate(String username, String password) async {
    // 模拟网络请求
    await Future.delayed(Duration(seconds: 2));
    if (username == 'admin' && password == '123456') {
      return true;
    } else {
      throw Exception('用户名或密码错误');
    }
  }
}